<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商户模板费率')" />
    <th:block th:include="include :: datetimepicker-css" />
        <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-MerchantModel-edit" th:object="${merchantModel}">
            <input name="id" th:field="*{id}" type="hidden">
            <input name="modelType" th:field="*{modelType}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">模板编号：</label>
                <div class="col-sm-8">
                    <input name="modelNo" th:field="*{modelNo}" readonly class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">模板名称：</label>
                <div class="col-sm-8">
                    <input name="modelName" th:field="*{modelName}" class="form-control" type="text">
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">产品类型：</label>
                <div class="col-sm-8">
                    <select name="proNum" class="form-control m-b" th:field="*{proNum}">
                        <option  th:each="p,pStat:${proList}" th:value="${p.proNum}" th:text="${p.proName}"></option>
                    </select>
                </div>
            </div>-->

            <div class="form-group">
                <label class="col-sm-3 control-label">是否可见：</label>
                <div class="col-sm-8">
                    <select name="isShow" class="form-control m-b" th:with="type=${@dict.getType('isShow')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isShow}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否默认：</label>
                <div class="col-sm-8">
                    <select name="isDefault" class="form-control m-b" th:with="type=${@dict.getType('isDefault')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isDefault}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">费率描述：</label>
                <div class="col-sm-8">
                    <input name="rateValue" th:field="*{rateValue}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "merchant/merchantModel";
        $("#form-MerchantModel-edit").validate({
            focusCleanup: true
        });

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-MerchantModel-edit').serialize());
            }
        }

        $("input[name='addTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>